﻿@*子菜單的html代碼*@
@model List<NestableSortInput>

@*展示无限级别子菜单*@
@if (Model != null)
{
    <ol class="dd-list">
        @foreach (var item in Model)
        {
            <li class="dd-item" data-id="@item.id">
                <div class="dd-handle">
                    @if (item.IsUrl)
                    {
                        <img style="height: 20px;" src="@item.NameOrUrl"/>
                    }
                    else
                    {
                        @item.NameOrUrl
                    }
                </div>
                @*永遠實在li中包含ol表示子菜單*@
                @Html.Partial("_Child", item.Children)
            </li>
        }
    </ol>
}